package com.youoor.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.youoor.common.base.BaseDaoImpl;
import com.youoor.common.base.BaseMapper;
import com.youoor.dao.CardLinkDao;
import com.youoor.domain.CardLink;
import com.youoor.domain.CardLinkQuery;
import com.youoor.persistence.CardLinkMapper;
@Repository("cardLinkDao")
public class CardLinkDaoImpl extends BaseDaoImpl<CardLink,CardLinkQuery,Long> implements CardLinkDao {
	private static final Logger logger = LoggerFactory.getLogger(CardLinkDaoImpl.class);
	

	
	@Resource
	private CardLinkMapper cardLinkMapper;


	@Override
	public BaseMapper<CardLink, CardLinkQuery, Long> getBaseMapper() {
		return cardLinkMapper;
	}


	@Override
	public List<CardLink> getLinksByCardId(Integer cardId) {
		CardLinkQuery query = new CardLinkQuery();
		query.createCriteria().andCardIdEqualTo(cardId);
		return cardLinkMapper.selectByExample(query,null);
		
	}




}
